<?php

    namespace app\index\controller;
    use think\Controller;
    use think\Request;
    use app\index\model\Sign;
    use think\Db;

    class Signshow extends Controller{


        public function index(){

            //签到列表信息volist
            $sign = New Sign();
            $data = $sign -> sign_list();
            //dump($data->toArray());
            $this->assign('sign_list',$data);

            return $this->fetch();
        }

        //
        
        public function dosign(){

            if(request()->isPost()){
                $sign=new Sign();
                $data=input('post.');
                //var_dump($data);
                $num=$sign->change($data);
                
                if($num==1){
                    $this->success("签到成功","index/signshow/index");
                }else{
                    $this->error('请勿重复签到');
                }
            }
        }

    }

?>